
<?php defined('_JEXEC') or die('Restricted access'); 

	$edit		= JRequest::getVar('edit',true);
	$text = !$edit ? JText::_( 'Thêm mới' ) : JText::_( 'Sửa' );
	JToolBarHelper::title(JText::_( 'Danh sách đề tài' ).': <small><small>[ ' . $text.' ]</small></small>','plugin.png' );
	JToolBarHelper::save( 'save', 'Lưu' );
	JToolBarHelper::cancel( 'cancel', 'Quay lại' );
	
	$editor =& JFactory::getEditor();
?>

<script language="javascript" type="text/javascript">
	function submitbutton(pressbutton) {
		var form = document.adminForm;
		if (pressbutton == 'cancel') {
			submitform( pressbutton );
			return;
		}
		
		if (document.getElementById('name').value == 0){
			alert( "<?php echo JText::_( 'Bạn chưa nhập Tên đề tài', true ); ?>" );
		} else {
			submitform( pressbutton );
		}	
	}
	
</script>
<style type="text/css">
	table.paramlist td.paramlist_key {
/*		width: 92px;
*/		text-align: left;
		height: 30px;
	}

</style>

<form action="index.php" method="post" name="adminForm" id="adminForm" >
<div>
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Chi tiết' ); ?></legend>

		<table class="admintable">
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Hiển thị' ); ?>:</td>
			<td width="500">
				<?php echo $this->lists['published']; ?>
			</td>
		</tr>		
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Tên đề tài' ); ?>:</td>
			<td width="500">	
				<textarea class="text_area" name="name" id="name" cols="80" rows="2"><?php echo $this->item->name;?></textarea>	
			</td>
		</tr>		
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Mã đề tài' ); ?>:</td>
			<td width="500">	
				<input class="text_area" type="text" name="ma" id="ma" size="32" value="<?php echo $this->item->ma;?>" />
			</td>
		</tr>	
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Hướng nghiên cứu' ); ?>:</td>
			<td width="500">
				<?php echo $this->lists['category']; ?>
			</td>
		</tr>			
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Năm bắt đầu' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="thoigian_batdau" id="thoigian_batdau" size="32" value="<?php echo $this->item->thoigian_batdau;?>" /> (tháng/năm)		
			</td>
		</tr>
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Năm kết thúc' ); ?>:</td>
			<td width="500">
				<input class="text_area" type="text" name="thoigian_ketthuc" id="thoigian_ketthuc" size="32" value="<?php echo $this->item->thoigian_ketthuc;?>" /> (tháng/năm)		
			</td>
		</tr>	
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Kết quả' ); ?>:</td>
			<td width="500">
				<?php echo DetaiHelper::nghiemthuRadio($this->item->nghiemthu); ?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key"><?php echo JText::_( 'Cơ quan chủ trì' ); ?>:</td>
			<td width="500">
				<?php echo $this->lists['donvi']; ?>
			</td>
		</tr>		
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Chủ nhiệm đề tài' ); ?>:</td>
			<td width="500">
				<textarea class="text_area" name="chunhiem" id="chunhiem" cols="50" rows="2"><?php echo $this->item->chunhiem;?></textarea>			
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Tổng kinh phí' ); ?>:</td>
			<td width="500">
				<textarea class="text_area" name="kinhphi" id="kinhphi" cols="50" rows="2"><?php echo $this->item->kinhphi;?></textarea>					
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Báo cáo kết quả KHCN' ); ?>:</td>
			<td width="500">				
				<?php
					echo $editor->display('muctieu', $this->item->muctieu, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>	
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Kết quả nghiệm thu' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('ketqua', $this->item->ketqua, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Sản phẩm chính' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('sanpham', $this->item->sanpham, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>	
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Điều chỉnh' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('donggop', $this->item->donggop, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>		
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Thuyết minh chi tiết' ); ?>:</td>
			<td width="500">				
				<?php
					echo $editor->display('noidung', $this->item->noidung, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>	
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'Báo cáo kết quả KHCN' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('khuvuc', $this->item->khuvuc, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>
		<tr>
			<td align="right" class="key" valign="top"><?php echo JText::_( 'File kèm theo' ); ?>:</td>
			<td width="500">
				<?php
					echo $editor->display('files', $this->item->files, '750', '100', '180', '50', true, array('pagebreak', 'readmore'));
				?>
			</td>
		</tr>
	</table>
	</fieldset>
</div>

<div class="clr"></div>
	<input type="hidden" name="option" value="com_detai" />
	<input type="hidden" name="cid[]" value="<?php echo $this->item->id; ?>" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="view" value="danhsach" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>